<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.29
     from pp.tnf on 19 December 2010 -->

<TITLE>Products and Parameters Reference - Processor Generation</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000" BACKGROUND="gifs/bg.gif">
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0" VALIGN=BOTTOM>
<TR VALIGN=BOTTOM>
<TD WIDTH="160" VALIGN=BOTTOM>
<A HREF="http://eli-project.sourceforge.net/">
<IMG SRC="gifs/elilogo.gif" BORDER=0>
</A>&nbsp;
</TD>
<TD WIDTH="25" VALIGN=BOTTOM>
<img src="gifs/empty.gif" WIDTH=25 HEIGHT=25>
</TD>
<TD ALIGN=LEFT WIDTH="475" VALIGN=BOTTOM>
<A HREF="index.html"><IMG SRC="gifs/title.png" BORDER=0></A>
</TD>
<!-- |DELETE FOR SOURCEFORGE LOGO|
<TD>
<a href="http://sourceforge.net/projects/eli-project">
<img
  src="http://sflogo.sourceforge.net/sflogo.php?group_id=70447&amp;type=13"
  width="120" height="30"
  alt="Get Eli: Translator Construction Made Easy at SourceForge.net.
    Fast, secure and Free Open Source software downloads"/>
</a>
</TD>
|DELETE FOR SOURCEFORGE LOGO| -->
</TR>
</TABLE>

<HR size=1 noshade width=785 align=left>
<TABLE BORDER=0 CELLSPACING=2 CELLPADDING=0>
<TR>
<TD VALIGN=TOP WIDTH="160">
<h4>General Information</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="index.html">Eli: Translator Construction Made Easy</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="gindex_1.html#SEC1">Global Index</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="faq_toc.html" >Frequently Asked Questions</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ee.html" >Typical Eli Usage Errors</a> </td></tr>
</table>

<h4>Tutorials</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="EliRefCard_toc.html">Quick Reference Card</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="novice_toc.html">Guide For new Eli Users</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="news_toc.html">Release Notes of Eli</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="nametutorial_toc.html">Tutorial on Name Analysis</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="typetutorial_toc.html">Tutorial on Type Analysis</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ee.html" >Typical Eli Usage Errors</a> </td></tr>
</table>

<h4>Reference Manuals</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ui_toc.html">User Interface</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="pp_toc.html">Eli products and parameters</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lidoref_toc.html">LIDO Reference Manual</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ee.html" >Typical Eli Usage Errors</a> </td></tr>
</table>

<h4>Libraries</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lib_toc.html">Eli library routines</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="modlib_toc.html">Specification Module Library</a></td></tr>
</table>

<h4>Translation Tasks</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lex_toc.html">Lexical analysis specification</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="syntax_toc.html">Syntactic Analysis Manual</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="comptrees_toc.html">Computation in Trees</a></td></tr>
</table>

<h4>Tools</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lcl_toc.html">LIGA Control Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="show_toc.html">Debugging Information for LIDO</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="gorto_toc.html">Graphical ORder TOol</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="fw_toc.html">FunnelWeb User's Manual</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ptg_toc.html">Pattern-based Text Generator</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="deftbl_toc.html">Property Definition Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="oil_toc.html">Operator Identification Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="tp_toc.html">Tree Grammar Specification Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="clp_toc.html">Command Line Processing</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="cola_toc.html">COLA Options Reference Manual</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="idem_toc.html">Generating Unparsing Code</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="mon_toc.html">Monitoring a Processor's Execution</a> </td></tr>
</table>

<h4>Administration</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="sysadmin_toc.html">System Administration Guide</a> </td></tr>
</table>

<HR WIDTH="100%">
<A HREF="mailto:eli-project-users@lists.sourceforge.net">
<IMG SRC="gifs/button_mail.gif" BORDER=0 ALIGN="left"></A>
<A HREF="index.html"><IMG SRC="gifs/home.gif" BORDER=0 ALIGN="right"></A>

</TD>
<TD VALIGN=TOP WIDTH="25"><img src="gifs/empty.gif" WIDTH=25 HEIGHT=25></TD>

<TD VALIGN=TOP WIDTH="600">
<H1>Products and Parameters Reference</H1>
<P>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_2.html"><IMG SRC="gifs/next.gif" ALT="Next Chapter" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_toc.html"><IMG SRC="gifs/up.gif" ALT="Table of Contents" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT="">
<HR size=1 noshade width=600 align=left>
<H1><A NAME="SEC1" HREF="pp_toc.html#SEC1">Processor Generation</A></H1>
<P>
Eli's task is to create a text processor that implements a set of
specifications.
Two forms of that processor can be extracted from Eli: an executable form and a
source form.
The processor can also be tested without extracting it from Eli
(see  <A HREF="pp_4.html#SEC29">Testing a Generated Processor</A>).
Regardless of the ultimate disposition of the processor, its behavior can be
influenced in a number of ways by parameters.
<P>
<H2><A NAME="SEC2" HREF="pp_toc.html#SEC2">exe -- Executable Version of the Processor</A></H2>
<P>
<A NAME="IDX3"></A>
<PRE>
:exe
</PRE>
<P>
A binary file containing the executable program
<A NAME="IDX4"></A>
generated from the given specifications.
During specification development, <CODE>:exe</CODE> is used as a
means of collecting error reports (see  <A HREF="pp_3.html#SEC26">help -- Cross-Reference to Documentation</A>):
<P>
<PRE>
pascal.specs:exe:help
</PRE>
<P>
When this derivation yields an empty result, indicating that no errors were
detected in the specifications, the generated processor can be tested
by requesting the <CODE>stdout</CODE> (see  <A HREF="pp_4.html#SEC31">stdout -- Standard Output from Processor Execution</A>),
<CODE>output</CODE> (see  <A HREF="pp_4.html#SEC32">output -- Files Resulting from Processor Execution</A>),
<CODE>dbx</CODE>, <CODE>gdb</CODE> (see  <A HREF="pp_4.html#SEC34">Debugging -- Debug a Program Interactively at the Source Level</A>),
<CODE>mon</CODE>, <CODE>mongdb</CODE> (see  <A HREF="pp_4.html#SEC35">Monitoring -- Monitor a program at the specification level</A>)
or
<CODE>run</CODE> (see  <A HREF="pp_4.html#SEC33">run -- Execute the Processor in the Current Directory</A>)
products.
After testing has been completed, <CODE>exe</CODE> can be used to extract the
executable processor from the cache for use in arbitrary contexts:
<P>
<PRE>
pascal.specs:exe&#62;pc
</PRE>
<P>
<H2><A NAME="SEC3" HREF="pp_toc.html#SEC3">source -- Source Version of the Processor</A></H2>
<P>
<A NAME="IDX5"></A>
<PRE>
:source
</PRE>
<P>
A directory containing the source language files
<A NAME="IDX6"></A>
and header files
<A NAME="IDX7"></A>
necessary to construct the generated processor.
This directory is completely self-contained, unless a library specification
was given by the user.
All Eli library routines
<A NAME="IDX8"></A>
used are included in source form.
There is also a makefile,
<A NAME="IDX9"></A>
so an executable processor can be constructed by
entering the directory and giving the command <CODE>make</CODE>.
<P>
To extract the directory from the cache, use the following Eli request:
<P>
<PRE>
pascal.specs:source&#62;<VAR>dir</VAR>
</PRE>
<P>
Here <VAR>dir</VAR> is the name of an existing directory.
The directory may or may not be empty.
If it is empty, Eli will copy all of the files needed to construct the
processor (except user-specified libraries) from the cache to <VAR>dir</VAR>.
Otherwise, Eli will copy only those files that differ from the files with
the same name in <VAR>dir</VAR>.
This means that if you alter the specifications for the processor and then
request a new source directory, only the files actually affected by your
specification change will be updated.
Therefore if you run <CODE>make</CODE> in <VAR>dir</VAR>, unaltered routines will not
be recompiled.
<P>
<H2><A NAME="SEC4" HREF="pp_toc.html#SEC4">fwGen -- Obtain the Product Files Generated by FunnelWeb</A></H2>
<P>
<A NAME="IDX10"></A>
<PRE>
:fwGen
</PRE>
<P>
A directory containing the files generated by the FunnelWeb "tangle" phase.
See  <A HREF="fw_2.html#SEC3">Output Files of FunnelWeb User's Manual</A>.  This derivation can only
be applied to type-<CODE>fw</CODE> files.  The resulting directory will contain
all files generated by <CODE>@O</CODE> macros in the FunnelWeb file.
For example, to generate the "tangled" files from the file <TT>`pascal.fw'</TT>,
use the following Eli request:
<P>
<PRE>
pascal.fw:fwGen&#62;<VAR>dir</VAR>
</PRE>
 
Here <VAR>dir</VAR> is the name of an existing directory.
<P>
<H2><A NAME="SEC5" HREF="pp_toc.html#SEC5">fold -- Make the Processor Case-Insensitive</A></H2>
<P>
<A NAME="IDX11"></A>
<PRE>
+fold
</PRE>
<P>
Eli normally produces a compiler that treats upper and lower case
<A NAME="IDX13"></A>
<A NAME="IDX14"></A>
<A NAME="IDX15"></A>
<A NAME="IDX12"></A>
letters as distinct characters in identifiers and keywords.
If <CODE>fold</CODE> is used, implementation of the processor <CODE>mkidn</CODE>
<A NAME="IDX16"></A>
is altered so that it treats the upper and lower case versions of a
letter as being identical.
<P>
The <CODE>fold</CODE> causes all identifiers to be stored in their upper-case
form.
When an identifier is output,
<A NAME="IDX18"></A>
<A NAME="IDX17"></A>
therefore, it will appear in upper case
regardless of its representation in the input text.
<P>
<H2><A NAME="SEC6" HREF="pp_toc.html#SEC6">define -- Set C Pre-Processor Symbols</A></H2>
<P>
<A NAME="IDX19"></A>
<PRE>
+define='<VAR>item</VAR> &hellip;'
</PRE>
<P>
All C compilations
<A NAME="IDX20"></A>
required by the derivation will be provided with flag
<CODE>-D</CODE><VAR>item</VAR> for each item in the argument.
An item is any sequence of non-white-space characters other than
apostrophes.
Items are separated by white space.
Any number of items may be specified.
<P>
The following items are pre-defined:
<P>
<A NAME="IDX21"></A>
<DL COMPACT>
<DT><CODE>STOPAFTERBADPARSE</CODE>
<DD>Generate a processor that will terminate after parsing if syntax errors are
detected
(see  <A HREF="syntax_5.html#SEC29">Improving Error Recovery in the Generated Parser of Syntactic Analysis</A>).
</DL>
<P>
<H2><A NAME="SEC7" HREF="pp_toc.html#SEC7">ignore -- Do Not Verify include Files</A></H2>
<P>
<A NAME="IDX22"></A>
<PRE>
+ignore='<VAR>path</VAR>'
</PRE>
<P>
Eli normally verifies the presence of files requested by <CODE>#include</CODE>
<A NAME="IDX24"></A>
<A NAME="IDX23"></A>
directives in any file that it processes.
The <CODE>ignore</CODE> parameter tells Eli not to verify the presence of such
files if their full names begin with <VAR>path</VAR>.
<P>
If a derivation does not specify any <CODE>ignore</CODE> parameters,
<CODE>+ignore='/usr/include'</CODE> is assumed.
(This assumption is not made if any <CODE>ignore</CODE> parameters are given
explicitly.)
<P>
<H2><A NAME="SEC8" HREF="pp_toc.html#SEC8">parser -- Choose the parser generator</A></H2>
<P>
<A NAME="IDX25"></A>
<PRE>
+parser
+parser=pgs
+parser=cola
+parser=none
</PRE>
<P>
Eli incorporates two parser generators,
<A NAME="IDX26"></A>
<DFN>PGS</DFN>
<A NAME="IDX27"></A>
and <DFN>COLA</DFN>.
<A NAME="IDX28"></A>
Both produce parsers from LALR(1) grammars, and the parsers they produce
recover automatically from syntactic errors.
A PGS-generated parser does not reduce by chain productions.
This means that it accepts some grammars that are not LALR(1), and the
generated parser is faster than a COLA-generated parser for languages with
many precedence levels in expressions.
Parsers generated by COLA include more information in error messages
about expected tokens than those generated by PGS do.
<P>
The error reports provided by the two parser generators differ somewhat,
and it is sometimes useful to try the other generator when one produces a
message you don't understand.
Remember, however, that PGS accepts a wider class of grammars.
Thus COLA may report errors for a grammar and PGS may not.
<P>
One of the two parser generators is selected as the default at the time the
Eli system is generated.
The default parser generator will be used if the <CODE>parser</CODE> parameter is
absent.
A request specifying <CODE>+parser</CODE> only will cause the non-default
parser generator to be used.
Specifying <CODE>+parser=pgs</CODE> will cause PGS to be used, while specifying
<CODE>+parser=cola</CODE> will cause COLA to be used.
<P>
The default parser generator can be changed by changing the shell scripts
<TT>`parserOut.sh'</TT>, <TT>`bnfOut.sh'</TT> and <TT>`infoOut.sh'</TT> in directory
<TT>`$elipkg/parser'</TT>.
<A NAME="IDX29"></A>
<A NAME="IDX30"></A>
<P>
Sometimes it is desirable to not have a generated parser.  For example,
the user may be building a tree for attribution using hand-written
code or code produced by an application external to Eli.  Specifying
<CODE>+parser=none</CODE> will cause Eli not to generate a parser.
<P>
<H2><A NAME="SEC9" HREF="pp_toc.html#SEC9">nomain -- Omitting the main program</A></H2>
<P>
<A NAME="IDX31"></A>
<PRE>
+nomain
</PRE>
<A NAME="IDX32"></A>
<A NAME="IDX33"></A>
<P>
Normally Eli generates a main program that invokes the generated
components in an appropriate order.  Sometimes the user wants to have
more control by providing their own main program.  In this situation
<CODE>+nomain</CODE> should be specified to omit the standard Eli main
program.
<P>
<HR size=1 noshade width=600 align=left>
<P>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_2.html"><IMG SRC="gifs/next.gif" ALT="Next Chapter" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_toc.html"><IMG SRC="gifs/up.gif" ALT="Table of Contents" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT="">
<HR size=1 noshade width=600 align=left>
</TD>
</TR>
</TABLE>

</BODY></HTML>
